<template>
  <div id="app">
    <h1>App父组件</h1>
    <eventBusA v-for="(item, index) in list"
               :key="index"
               :index="index"
               :title="item.title"
               :price="item.price"
               :hot="item.hot"></eventBusA>
    <hr>
    <eventBusB :arr="this.list"></eventBusB>
  </div>
</template>

<script>
import eventBusA from './components/31-EventBus事件中心A.vue'
import eventBusB from './components/31-EventBus事件中心B.vue'
export default {
  name: 'App',
  data () {
    return {
      list: [
        { title: '超级好吃的棒棒糖', price: 10.99, hot: '开业大酬宾' },
        { title: '超级好吃的炸鸡腿', price: 13.66, hot: '开业大酬宾，全场7折' },
        { title: '超级好吃的冰淇淋', price: 12.33, hot: '周年庆，前100名免费送' },
      ]
    }
  },
  components: {
    eventBusA,
    eventBusB
  }
}
</script>

<style>
</style>